package com.hxzy.controller.admin.mapstruct;

import com.hxzy.controller.admin.product.req.ProductAddReq;
import com.hxzy.controller.admin.product.req.ProductEditReq;
import com.hxzy.controller.admin.product.resp.ProductResp;
import com.hxzy.entity.Product;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @Author wy
 * @Description TODO
 * @Date 2023/7/14 9:04
 * @Version 1.0
 */
@Mapper
public interface ProductConvert {

    ProductConvert INSTANCE= Mappers.getMapper(ProductConvert.class);

    Product  convert(ProductAddReq req);
    Product convert(ProductEditReq req);

    ProductResp convert(Product entity);
}
